<?php
/**
 * Created by PhpStorm.
 * User: 快定
 * Date: 2022/1/5
 * Time: 14:35
 */

$redis = new Redis();
$redis->connect("127.0.0.1",'6379');
$key = "listMq";
while (true){
    $data = $redis->brPop($key,0);
    if (json_decode($data[1])){
        var_dump(json_decode($data[1],true));
    }
    echo "\n";
}
